﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Blackbird.Database
{
    class Database
    {
        /// <summary>
        /// The host for the MySQL server provided as a string.
        /// </summary>
        public string Host;

        /// <summary>
        /// The user for the MySQL server.
        /// </summary>
        public string User;

        /// <summary>
        /// The password for the user.
        /// </summary>
        public string Password;

        /// <summary>
        /// The name of the database.
        /// </summary>
        public string DatabaseName;

        /// <summary>
        /// The maximum pooling size of the database client.
        /// </summary>
        private uint MaxPoolSize;

        /// <summary>
        /// The minimum pooling size.
        /// </summary>
        private uint MinPoolSize;

        /// <summary>
        /// Construct a new instance of the database.
        /// </summary>
        /// <param name="name">The name of the database</param>
        /// <param name="MaxPoolSize">The maximum pool size for the database.</param>
        /// <param name="MinPoolSize">The minimum pool size for the database.</param>
        public Database(string name, uint MaxPoolSize, uint MinPoolSize)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("The database name cannot be 0 characters!");
            }
            this.DatabaseName = name;
            this.MaxPoolSize = MaxPoolSize;
            this.MinPoolSize = MinPoolSize;
        }
    }
}
